package com.kotlin.hxh.ui.fragment.fourth.child

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.kotlin.hxh.R
import com.kotlin.hxh.base.BaseMainFragment
import kotlinx.android.synthetic.main.zhihu_fragment_fourth_settings.*


/**
 * @author huxh
 * @date 2018/12/20.
 */
class SettingsFragment : BaseMainFragment() {
    companion object {
        @JvmStatic
        fun newInstance(): SettingsFragment {
            val fragment = SettingsFragment()
            fragment.arguments = Bundle()
            return fragment
        }

    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?) = inflater.inflate(R.layout.zhihu_fragment_fourth_settings, container, false)
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initView()
    }

    private fun initView() {
        toolbarSettings.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp)
        toolbarSettings.setNavigationOnClickListener { _mActivity.onBackPressed() }
    }

    override fun onBackPressedSupport(): Boolean {
        pop()
        return true
    }

}